package com.xyw.his00.tests;


import com.xyw.his00.service.Impl.dbImpl.DepartmentServiceImpl;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan(basePackages = "com.xyw.his00")
public class test1 {
    @Resource//todo:为什么用Resource而不是Autowired？为什么注入两个组件都不能访问其中的方法，返回的对象为空？是因为没有配置扫描包吗?或者是因为实现类默认容器只会实现首字母小写的实现类从而导致不能注入吗？
  //  private DepartmentMapper departmentMapper;
    private DepartmentServiceImpl departmentServiceImpl;
    @Test
    public void test() {
        System.out.println(departmentServiceImpl.getById(2));
    }
}
